<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label for="c-level_id" class="control-label col-xs-12 col-sm-2">{:__('骑手等级')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-level_id" data-rule="required" class="form-control selectpicker" name="row[level_id]">
                {foreach name="levelList" item="vo"}
                <option value="{$vo.id}" {if condition="$row['level_id'] eq $vo['id']"}selected{/if}>{$vo.level_name}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label for="c-level_id" class="control-label col-xs-12 col-sm-2">{:__('分销商')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-agent_id" data-rule="required" class="form-control selectpicker" name="row[agent_id]">
                <option value="0">平台骑手</option>
                {foreach name="agents" item="vo"}
                <option value="{$key}" {if condition="$row['agent_id'] eq $key"}selected{/if}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('骑手姓名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-poster_name" data-rule="required" class="form-control" name="row[poster_name]" type="text" value="{$row.poster_name|htmlentities}">
        </div>
    </div>
    <!--<div class="form-group">-->
    <!--    <label class="control-label col-xs-12 col-sm-2">{:__('骑手类型')}:</label>-->
    <!--    <div class="col-xs-12 col-sm-8">-->
    <!--        {:build_radios('row[poster_type]', ['1'=>__('全职'), '2'=>__('兼职')], $row['poster_type'])}-->
    <!--    </div>-->
    <!--</div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('骑手手机号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mobile" data-rule="required" class="form-control" name="row[mobile]" type="text" value="{$row.mobile|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('所在学校')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-template" data-rule="required" class="form-control selectpage" data-source="main/school/index" name="row[school]" type="text" value="{$row.school|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('佣金类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[poster_type]', ['1'=>__('个数(元/个)'), '2'=>__('在线时长(元/H)')], $row['poster_type'])}
        </div>
    </div>
    <input id="c-brokerage_type" data-rule="required" class="form-control" name="row[brokerage_type]" type="hidden" value="2">
    <div class="form-group self_scale" >
        <label class="control-label col-xs-12 col-sm-2">{:__('佣金')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-3">{:__('佣金')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-brokerage_scale" data-rule="required" class="form-control" style="width: 80px;" name="row[brokerage_scale]" type="number" value="{$row.brokerage_scale}">
                </div>
            </div>
        </div>
    </div>
    <div class="form-group self_scale" id="upstairs_scale" style="<?php if($row['poster_type'] == 2){ echo 'display:none;'; } ?>">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-3">{:__('贵重物品佣金比例(%)')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-upstairs_scale" data-rule="required" class="form-control" style="width: 80px" name="row[upstairs_scale]" type="number" value="{$row.upstairs_scale}">
                </div>
            </div>
        </div>
    </div>
    <div class="form-group self_scale" id="valuable_scale" style="<?php if($row['poster_type'] == 2){ echo 'display:none;'; } ?>">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-3">{:__('加急佣金比例(%)')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-valuable_scale" data-rule="required" class="form-control" style="width: 80px" name="row[valuable_scale]" type="number" value="{$row.valuable_scale}">
                </div>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('状态')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['1'=>__('正常'), '0'=>__('锁定')], $row['status'])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
